wayland: Don't try and reset the pointer window grab if there wasn't one
authorRob Bradford <rob@linux.intel.com>
Mon, 5 Mar 2012 19:35:38 +0000 (19:35 +0000)
committerRob Bradford <rob@linux.intel.com>
Tue, 6 Mar 2012 21:24:41 +0000 (21:24 +0000)
gdk/wayland/gdkdevice-wayland.c

index 9e8e6b17d809a04354222016231b6721c5000872..1d6d0448a607dc7ce7fad86762409f11756045b0 100644 (file)
@@ -279,9 +279,10 @@ gdk_device_core_ungrab (GdkDevice *device,
       if (grab)
         grab->serial_end = grab->serial_start;
 
-      _gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
-                                              NULL,
-                                              0);
+      if (wayland_device->pointer_grab_window)
+        _gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
+                                                NULL,
+                                                0);
     }
 }